<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>成远生产管控平台 - 登录</title>
    <link rel="stylesheet" href="css/login.css">
    <script>
        // 全局配置
        window.appConfig = {
            // apiBaseUrl: 'http://localhost:8080' // 开发环境
            apiBaseUrl: 'http://59.110.144.74:8080' // 生产环境
        };
    </script>

</head>
<body>
<div class="login-container">
    <div class="title-container">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>成远生产管控平台<br>矿车载量信息查询系统</legend>
        </fieldset>
    </div>
    <div class="login-title">用户登录</div>
    <form class="layui-form" lay-filter="loginForm">
        <div class="form-group">
            <div class="form-icon">
                <i class="fa fa-user-circle-o"></i>
            </div>
            <div class="form-input">
                <input type="text" name="username" id="username" autocomplete="current-password" placeholder="用户名"
                       class="layui-input" lay-verify="required">
            </div>
        </div>

        <div class="form-group">
            <div class="form-icon">
                <i class="fa fa-lock"></i>
            </div>
            <div class="form-input">
                <input type="password" name="password" id="password" autocomplete="new-password"
                       placeholder="请输入密码"
                       class="layui-input" lay-verify="password">
                <i class="fa fa-eye toggle-password" id="togglePassword"></i>
            </div>
        </div>

        <button class="btn-login" lay-submit lay-filter="loginForm">登 录</button>

        <div class="remember-forget">
            <div class="remember-me">
                <!-- 直接使用原生勾选框 -->
                <input type="checkbox" id="rememberMe" name="rememberMe">
                <span>记住我</span>
            </div>
            <div class="forgot-password">
                <a href="javascript:void(0);" id="forgotPassword">忘记密码？</a>
            </div>
        </div>
    </form>

    <div class="register-link">
        <a href="javascript:void(0);" class="register-btn">立即注册</a>
    </div>
</div>
<!-- Font Awesome -->
<link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Moment.js -->
<script src="https://cdn.jsdelivr.net/npm/moment@2.29.4/moment.min.js"></script>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- Layui -->
<link rel="stylesheet" href="./layui/css/layui.css"/>
<script src="./layui/layui.js"></script>
<!-- SheetJS (XLSX) -->
<script src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script>
<!-- FileSaver.js -->
<script src="https://cdn.jsdelivr.net/npm/file-saver@2.0.5/dist/FileSaver.min.js"></script>
<!-- 注册弹窗模板 -->
<script type="text/html" id="registerTpl">
    <form class="layui-form" lay-filter="registerForm">
        <div class="layui-form-item">
            <label class="layui-form-label"><i class="fa fa-user-plus"></i></label>
            <div class="layui-input-inline">
                <input type="text" name="username" placeholder="请输入用户名" class="layui-input" lay-verify="username">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><i class="fa fa-lock"></i></label>
            <div class="layui-input-inline">
                <input type="password" name="password" id="registerPassword"
                       placeholder="请输入密码"
                       class="layui-input"
                       lay-verify="password"
                       autocomplete="new-password">
                <i class="fa fa-eye toggle-password" id="toggleRegisterPassword"></i>
            </div>
            <div class="password-strength" id="passwordStrength">
                <span></span><span></span><span></span><span class="strength-text"></span>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><i class="fa fa-building"></i></label>
            <div class="layui-input-inline">
                <select name="unitId" lay-verify="unitId">
                    <option value="">请选择单位</option>
                    {{# layui.each(d.units, function(index, item){ }}
                    <option value="{{item.id}}">{{item.unitName}}</option>
                    {{# }); }}
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="registerForm">注册</button>
            </div>
        </div>
    </form>
</script>
<script src="js/login.js"></script>
</body>
</html>